package com.mentorgen.tools.util.profile.bundle.obsolete;

import com.mentorgen.tools.profile.instrument.memory.MemoryCounter;

class MethodBandwidth {

	private long callNum    = 0;
	private long inDataSum  = 0;
	private long outDataSum = 0;

	public long getTotalIndata(){
		return inDataSum;
	}

	public long getTotalOutdata(){
		return outDataSum;
	}

	public void addDataExchng(long inData, long outData){
		inDataSum += inData;
		outDataSum += outData;
		callNum++;
	}

	public long getAvgMthdIndata(){
		return MemoryCounter.roundUpToNearestEightBytes(inDataSum / callNum);
	}

	public long getAvgMthdOutdata(){
		return MemoryCounter.roundUpToNearestEightBytes(outDataSum / callNum);
	}

	public long getMthdTotalCall(){
		return callNum;
	}
}
